Skip to content

Add support for Rocky Linux 10.1#797

Open
pranavcracker wants to merge 5 commits intomainfrom
feat/rocky_10.1
Open

Add support for Rocky Linux 10.1#797
pranavcracker wants to merge 5 commits intomainfrom
feat/rocky_10.1

Conversation

@pranavcracker
Copy link
Copy Markdown
Collaborator

@pranavcracker pranavcracker commented Mar 18, 2026

Description

  • This PR adds support for Rocky Linux 10.1 in Kubemarine and introduces improved handling of kernel upgrades during the system preparation phase.

Background

While validating Kubemarine on Rocky Linux 10.1, an issue was observed during the prepare.system.modprobe stage:

  • Kernel packages are upgraded during prepare.package_manager.manage_packages
  • The system continues running the old kernel (no reboot yet)
  • Required kernel modules (e.g., br_netfilter) are unavailable
  • This leads to failures in modprobe

Solution

  • Add support for Rocky Linux 10.1
  • Detect when reboot is required after package installation
  • Ensure reboot happens before kernel-dependent steps

Changes Introduced

1. Rocky Linux 10.1 Support

  • Added support for rhel10 OS family where applicable
  • Ensured compatibility with kernel 6.x and updated package behavior

2. Kernel Upgrade / Reboot Detection

  • Introduced detection of reboot requirement after package installation
  • For RHEL-based systems:
    • Uses needs-restarting -r to determine if reboot is required

3. Reboot Scheduling

  • If reboot is required scheduled it using cluster.schedule_cumulative_point(system.reboot_nodes)

4. Additional Reboot if required

  • Added cumulative reboot execution point beforeprepare.system.modprobe to perform an additional reboot if required.

How to apply

Test Cases

TestCase 1
Steps:

  1. Install cluster with Rocky Linux 10.1 OS

Results:

Before After
Failure Success

TestCase 2: Kernel upgrade during installation (Rocky Linux 10.1)
Steps:

  1. Prepare a fresh VM with Rocky Linux 10.1
  2. Ensure base image contains older running kernel
  3. Run Kubemarine installation
  4. During prepare.package_manager.manage_packages, allow kernel packages to upgrade
  5. Observe behavior before prepare.system.modprobe

Results:

Before After
modprobe failure due to missing kernel modules Early reboot triggered and modprobe succeeds

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • There is no breaking changes, or migration patch is provided
  • Integration CI passed
  • Unit tests. If Yes list of new/changed tests with brief description
  • There is no merge conflicts

Unit tests

Indicate new or changed unit tests and what they do, if any.

  • Updated existing tests to align with reboot detection logic

@pranavcracker pranavcracker marked this pull request as ready for review March 26, 2026 11:55
cluster.log.debug(
f"{host}: Reboot required (detected via needs-restarting -r)"
)
except GroupResultException:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we mock this in tests? I am not sure about always ignoring GroupResultException

package_name: 'iptables-nft'
rhel10:
containerd: {}
haproxy:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check HAProxy/keepalived versions on rhel10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants